<%-- 
    Document   : modify
    Created on : Mar 30, 2012, 9:50:34 PM
    Author     : allen
--%>
<%-- Header Area --%>
<%@ include file="/template/header.jsp" %> 
<%-- End of Header Area --%>

<h2>${title}</h2>
<div class="submenu">
    <ul>
        <li><a href="/manage">Manage</a></li>
    </ul>
    <div class="clear"></div>
</div>      
        
<table class="generic-vertical-table">
    <tr>
        <th>ID</th>
        <th>EMAIL</th>
        <th>PASSWORD</th>
        <th>FIRST NAME</th>
        <th>LAST NAME</th>
        <th>GENDER</th>
        <th>BIRTH DATE</th>
        <th>CONTACT</th>
        <th>ACTIVE</th>
        <th>ACTIONS</th>
    </tr>
    <% if (customers != null) {%>

    <% for (Customer cus : customers) {%>
    <tr>
        <td><%= cus.getId()%></td>
        <td><%= cus.getEmail()%></td>
        <td><%= cus.getPassword()%></td>
        <td><%= cus.getFirstName()%></td>
        <td><%= cus.getLastName()%></td>
        <td><%= cus.getGender()%></td>
        <td><%= cus.getBirthDate()%></td>
        <td><%= cus.getContact()%></td>
        <td><%= cus.isActive()  ? "Active" : "Inactive"%></td>
        
         <td>
            <% if (cus.isActive()) {%>
            <a href="/manage/user/activate?id=<%= cus.getId()%>&action=deactivate">Deactivate</a>
            <% } else {%>
            <a href="/manage/user/activate?id=<%= cus.getId()%>&action=activate">Activate</a>
            <% }%>

        </td>
    </tr>
    <% }%>
    <% } else {%>
    <tr>
        <td colspan="11" align="center">
            No accounts yet.
        </td>
    </tr>
    <% }%>
</table>
<%-- Footer Area --%>
<%@ include file="/template/footer.jsp" %>
<%-- End of Footer Area --%>
